<!doctype html>
<html>

	<head>
		<meta charset="utf-8">
		<title></title>
		<meta name="viewport" content="width=device-width,initial-scale=1,minimum-scale=1,maximum-scale=1,user-scalable=no" />
		<link href="css/mui.css" rel="stylesheet" />
	</head>

	<body>
		<div class="mui-content" style="margin: 0 auto;">
			<div class="" style="text-align: center; font-size: large;margin-top: 50px;">
				已成功开通<span id="" style="color: red;">
					0
				</span>个
				<div class="" style="margin-top: 20px;">
					<div class="mui-input-row">
						<label></label>
						<input type="text" id='uid' placeholder="请输入需要开通人的ID">
					</div>
					
				</div>
				<div class=""style="margin-top: 20px;">
					<button type="button" id="kt" class="mui-btn mui-btn-blue">开通</button>
				</div>
			</div>
			
			
		</div>
		<script src="js/mui.js"></script>
		<script type="text/javascript">
			(function($, doc) {
				 mui.init()
				 var kt = doc.getElementById('kt');
				 kt.addEventListener('tap',function(){
					 var uid=document.getElementById('uid')
					 if(!uid){
						 $.toast("ID不可为空")
						 return;
					 }
				 	$.ajax('http://192.168.1.3:8888/sys/updateUserInfoByOther',{
				 		data:{
				 			id:uid
				 		},
				 		dataType:'json',//服务器返回json格式数据
				 		crossDomain:true,
				 		type:'put',//HTTP请求类型
				 		timeout:10000,//超时时间设置为10秒；data
				 		headers:{'Content-Type':'application/json'},	              
				 		success:function(data){
				 			if(data.code==0){
				 				$.toast("开通成功")
				 			}else{
								$.toast(data.msg)
							}
				 			
				 		},
				 		error:function(xhr,type,errorThrown){
				 			alert(type)
				 			//异常处理；
				 			console.log(type);
				 		}
				 	});
				 })
				 
			}(mui, document));
			
		</script>
	</body>

</html>
